package cn.home.contract.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.home.contract.mapper.HomeContractInfoMapper;
import cn.home.contract.domain.HomeContractInfo;
import cn.home.contract.service.IHomeContractInfoService;

/**
 * 签约管理Service业务层处理
 * 
 * @author homedoctor
 * @date 2025-04-09
 */
@Service
public class HomeContractInfoServiceImpl implements IHomeContractInfoService 
{
    @Autowired
    private HomeContractInfoMapper homeContractInfoMapper;

    /**
     * 查询签约管理
     * 
     * @param id 签约管理主键
     * @return 签约管理
     */
    @Override
    public HomeContractInfo selectHomeContractInfoById(Long id)
    {
        return homeContractInfoMapper.selectHomeContractInfoById(id);
    }
    @Override
    public List<HomeContractInfo> getHomeContractInfo(){
        return homeContractInfoMapper.getHomeContractInfo();
    }

    /**
     * 查询签约管理列表
     * 
     * @param homeContractInfo 签约管理
     * @return 签约管理
     */
    @Override
    public List<HomeContractInfo> selectHomeContractInfoList(HomeContractInfo homeContractInfo)
    {
        return homeContractInfoMapper.selectHomeContractInfoList(homeContractInfo);
    }

    @Override
    public List<HomeContractInfo> selectHomeContractInfoByUserId(Long userId) {
        return homeContractInfoMapper.selectHomeContractInfoByUserId(userId);
    }

    /**
     * 新增签约管理
     * 
     * @param homeContractInfo 签约管理
     * @return 结果
     */
    @Override
    public int insertHomeContractInfo(HomeContractInfo homeContractInfo)
    {
        return homeContractInfoMapper.insertHomeContractInfo(homeContractInfo);
    }

    /**
     * 修改签约管理
     * 
     * @param homeContractInfo 签约管理
     * @return 结果
     */
    @Override
    public int updateHomeContractInfo(HomeContractInfo homeContractInfo)
    {
        return homeContractInfoMapper.updateHomeContractInfo(homeContractInfo);
    }

    /**
     * 批量删除签约管理
     * 
     * @param ids 需要删除的签约管理主键
     * @return 结果
     */
    @Override
    public int deleteHomeContractInfoByIds(Long[] ids)
    {
        return homeContractInfoMapper.deleteHomeContractInfoByIds(ids);
    }

    /**
     * 删除签约管理信息
     * 
     * @param id 签约管理主键
     * @return 结果
     */
    @Override
    public int deleteHomeContractInfoById(Long id)
    {
        return homeContractInfoMapper.deleteHomeContractInfoById(id);
    }
}
